function page_nav(num) {
    var userCode = document.getElementById("userCode").value;
    var userRole = document.getElementById("userRole").value;
    window.location.href = "http://localhost:8080/user/list?currentPage=" + num + "&userCode=" + userCode + "&userRole=" + userRole;
}

function jump_to(num) {
    //alert(num);
    //验证用户的输入
    var regexp = /^[1-9]\d*$/;
    var totalPageCount = document.getElementById("totalPageCount").value;
    if (!regexp.test(num)) {
        alert("请输入大于0的正整数！");
        return false;
    } else if ((num - totalPageCount) > 0) {
        alert("请输入小于总页数的页码");
        return false;
    } else {
        page_nav(num);
    }
}